import request from "@/utils/request";

/**
 * 设备使用借用单api接口集合
 * @method getList 列表
 * @method postAdd 新增
 * @method putEdit 修改
 * @method deleteDel 删除
 */

export function apiGetList(params, loading) {
    return request({
        url: "/device/deviceBorrowBillController/list",
        method: "get",
        params,
        loading
    });
}
export function apiPostAdd(data, loading) {
    return request({
        url: "/device/deviceBorrowBillController/add",
        method: "post",
        data: data,
        loading
    });
}
export function apiPutEdit(data, loading) {
    return request({
        url: "/device/deviceBorrowBillController/edit",
        method: "put",
        data: data,
        loading
    });
}
export function apiDeleteDel(ids, loading) {
    return request({
        url: "/device/deviceBorrowBillController/" + ids,
        method: "delete",
        loading
    });
}
export function apiGetObject(id, loading){
    return request({
        url: "/device/deviceBorrowBillController/" + id,
        method:'get',
        loading
    });
}

export function apiPostBus(data, loading){
    return request({
        url: "/device/deviceBorrowBillController/addByBus",
        method:'post',
        data: data,
        loading
    });
}

export function apiPostRemoveByBus(data, loading){
    return request({
        url: "/device/deviceBorrowBillController/removeByBus",
        method:'post',
        data: data,
        loading
    });
}